export const loadHistory = ()=>{
	let historyWords = [];
	try {
	    const value = uni.getStorageSync('historyWords');
	    if (value) {
	        historyWords = value;
	    }
	} catch (e) {
	    // error
	}
	return historyWords;
}

export const  saveHistoryWorld = word =>{
	let historyWords = [];
	try {
	    const value = uni.getStorageSync('historyWords');
	    if (value) {
	        historyWords = value;
	    }
	} catch (e) {
	    // error
	}
	if(historyWords.includes(word))return;
	historyWords.unshift(word);
	try{
		uni.setStorageSync('historyWords', historyWords);
	}catch(e){
		//TODO handle the exception
	}
}